package com.chixing.day01;

public class SyntaxDemoTest1 {
    public static void main(String[] args) {
        int[] arr = {10,43,28,3,84,10,74,89,33,43};
        findDupicateInArray(arr);
    }
    public static void findDupicateInArray(int[] arr){
        int count = 0;
        for (int i = 0;i < arr.length;i++){
            for (int j = i + 1;j < arr.length;j++){
                if (arr[i] == arr[j]){
                      count++;
                }
            }
            if (count == 1){
                System.out.print("重复元素:" + arr[i] +"\n");
                count = 0;
            }
        }


    }
}
